<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script type="text/javascript">
        var obj = new Object();
        obj.Name = "八戒"
        obj.Age = 500;

        //通过字面量的形式来定义对象
        var obj1 = { "Name": "八戒", "Age": "500" };
        var arr = [{ "Name": "八戒", "Age": "500" }, { "Name": "八戒1", "Age": "1000" }];

        //JSON格式：将json的字面量表示形式，当做字符串存放，则为json格式字符串
        var str = '{ "Name": "八戒", "Age": "500" }';
        var jsonstrarr = '[{ "Name": "八戒", "Age": "500" }, { "Name": "八戒1", "Age": "1000" }];';
        
        //将json字符串转换成js对象（数组）
        var resobj = JSON.parse(str);
        alert(resobj.Name+"是你吗？～～");

    </script>
</head>
<body>
</body>
</html>
